﻿<UserControl x:Class="CountJobTags.CheckableComboBox"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="25" d:DesignWidth="50">
    <ComboBox Name="cboChecked" LostFocus="cboChecked_LostFocus" GotFocus="cboChecked_GotFocus" DropDownOpened="cboChecked_DropDownOpened"
              SelectionChanged="cboChecked_SelectionChanged" >
        <ComboBox.ContextMenu>
            <ContextMenu>
                <MenuItem Header="Select _All" Click="mnuSelectAll_Click" />
                <MenuItem Header="_Unselect All" Click="mnuUnSelectAll_Click" />
                <MenuItem Header="_Invert Selection" Click="mnuInvertSelection_Click" />
            </ContextMenu>
        </ComboBox.ContextMenu>

        <ComboBox.ItemTemplate>
            <DataTemplate>
                <CheckBox Content="{Binding Caption}" IsChecked="{Binding IsSelected}" IsEnabled="{Binding IsNotDisplaySummary}" />
            </DataTemplate>
        </ComboBox.ItemTemplate>
    </ComboBox>
</UserControl>
